import Taro from '@tarojs/taro';

export function getStore(key) {
  let str = Taro.getStorageSync(key)
  return str ? JSON.parse(str) : str
}

export function setStore(key, value) {
  Taro.setStorageSync(key, JSON.stringify(value))
}